# encoding = utf-8
class Deal < ActiveRecord::Base
  belongs_to :user
  has_many :orders, :dependent => :destroy
  has_many :products, :through => :orders

  validates :user_id, :presence  => true
  validates :amount, :presence  => true
  validates :kind, :presence  => true

  attr_accessible :kind, :user_id, :amount, :status
end
